package com.spzx.user.api;

import com.spzx.common.core.constant.SecurityConstants;
import com.spzx.common.core.domain.R;
import com.spzx.user.domain.UserAddress;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @ClassName RemoteUserRegionAddressService
 * @Description TODO
 * @Author 东北彭于晏
 * @Date 2024/10/21  20:39
 * @Version 1.0
 **/
@FeignClient(contextId = "RemoteUserRegionAddressService" ,
        value = "spzx-user", fallbackFactory = RemoteUserAddressFallbackFactory.class)
public interface RemoteUserRegionAddressService {

    @GetMapping(value = "/user/region/treeSelect/{id}")
    R<UserAddress> getUserAddress(@PathVariable("id") Long id, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
